
#ifndef _DUNGEON_H_
#define _DUNGEON_H_

#define PARTY_RANK_SCORE_CONST1		100	// 파티원이 1명일 경우 산출 한 Rank값이 x1
#define PARTY_RANK_SCORE_CONST2		60	// 파티원이 2명일 경우 산출 한 Rank값이 x0.6
#define PARTY_RANK_SCORE_CONST3		40	// 파티원이 3명일 경우 산출 한 Rank값이 x0.4

namespace ProjectZ { namespace NLogic {
class Space;
} /*NLogic*/ } /*ProjectZ*/

namespace ProjectZ { namespace NCommand { namespace NDungeon {

class CN_PARTY_ENTER
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CN_PARTY_LEAVE
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
	static void SendPartyLeave(User *pUser, int chief_gid);

private:
	static void processDungeon(User * pUser, ::Network::Packet * pPacket);

};

class CN_PARTY_READY
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CS_DUNGEON_CARD_REWARD_EXECUTE_READY
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CS_DUNGEON_CLEAR_DETAIL_INFO
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CS_DUNGEON_CLEAR_INFO
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
	static int GetRank(User * pUser, NLogic::Space * pSpace);
	static int GetBonusExp(User * pUser, NLogic::Space * pSpace, int rank);
};

// NOT USE
//class CS_PARTY_CREATE
//{
//public:
//	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
//};

class CS_PARTY_INVITE
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CS_PARTY_INVITE_RES
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CS_PARTY_USER_LIST
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CS_USER_DEFAULT_INFO
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CS_REQ_DUNGEON_RANDOM_PARTY
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CS_REQ_DUNGEON_RANDOM_PARTY_TIME_OVER
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CS_REQ_DUNGEON_CREATE_SINGLE
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CS_REQ_DUNGEON_CREATE_PARTY_FRIEND
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CS_DUNGEON_INFO
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CN_DUNGEON_DETAIL_INFO
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);

private:
	static void processSingleDungeon(User * pUser, ::Network::Packet * pPacket);
	static void processPartyDungeon(User * pUser, ::Network::Packet * pPacket);

	static void sendPartyCreateDoneFail(User *pUser);
	static void sendInvitePacket(User * pReceiver, User * pChief, int inviteecount);

//	static void SendInvitePacket(User *pUser, User *pChief, int inviteecount);
//	static void SendPartyCreateDoneFail(User *pUser);
//	static void SendPartyInviteUserCount(User *pUser, int count);
//	static int GetPossibleInvitee(NLogic::Space * pSpace, PLAYER_LOCATE locate);
};

/// 젠소모 처리
class CS_DUNGEON_REBIRTH_ZEN
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

/// 패널티 처리 후 클라에 전송
class CS_DUNGEON_REBIRTH_VILLAGE
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CS_DUNGEON_MOB_VARIATION
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
};

class CS_REQ_EVENT_DUNGEON_INFO
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
	static void SendPacket(User * pUser, int16_t res, int remainMinute);
};

class CS_ENTER_EVENT_DUNGEON
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
	static void SendPacket(User * pUser, int16_t res);
	static void ConvertTime(time_t sec, char * buffer, int bufferLen);
};

class CS_REQ_EVENT_DUNGEON_STAMINA_INFO
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
	static void SendPacket(User * pUser, int16_t res, uint8_t stamina, uint64_t remainSec);
};

class CS_REQ_EVENT_DUNGEON_STAMINA_INFO_V2
{
public:
	static void OnExecute(User * pUser, ::Network::Packet * pPacket);
	static void SendPacket(User * pUser, int res, int stamina, uint64_t remainSec, int recoveryMinute);
};

} /*NDungeon*/ } /*NCommand*/ } /*ProjectZ*/


#endif /* _DUNGEON_H_ */
